* data.c (Fstring_to_number): Declare p to be an unsigned char, to
authorJim Blandy <jimb@redhat.com>
Tue, 2 Mar 1993 08:11:01 +0000 (08:11 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 2 Mar 1993 08:11:01 +0000 (08:11 +0000)
match the data field of strings.

* data.c (Fstring_to_number): Just skip tabs and spaces; don't use
the <ctype.h> macros.  The <ctype.h> stuff apparently varies from
locale to locale more than we'd like.  Don't include <ctype.h>.

src/data.c

index f5003641b38f2f55288232205236b3b7f9a56a22..20a28bee2b5b506d1040cd3eca42c27e45114aa3 100644 (file)
@@ -19,7 +19,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 
 #include <signal.h>
-#include <ctype.h>
 
 #include "config.h"
 #include "lisp.h"
@@ -1456,7 +1455,7 @@ This parses both integers and floating point numbers.")
   (str)
      register Lisp_Object str;
 {
-  char *p;
+  unsigned char *p;
 
   CHECK_STRING (str, 0);
 
@@ -1464,7 +1463,7 @@ This parses both integers and floating point numbers.")
 
   /* Skip any whitespace at the front of the number.  Some versions of
      atoi do this anyway, so we might as well make Emacs lisp consistent.  */
-  while (isspace (*p))
+  while (*p == ' ' || *p == '\t')
     p++;
 
 #ifdef LISP_FLOAT_TYPE